home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / gs261sr1.zip / GDEVEVGA.C < prev    next >
C/C++ Source or Header  |  1993-05-12  |  2KB  |  54 lines

  1. /* Copyright (C) 1993 Aladdin Enterprises.  All rights reserved.
  2.  
  3. This file is part of Ghostscript.
  4.  
  5. Ghostscript is distributed in the hope that it will be useful, but
  6. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. to anyone for the consequences of using it or for whether it serves any
  8. particular purpose or works at all, unless he says so in writing.  Refer
  9. to the Ghostscript General Public License for full details.
  10.  
  11. Everyone is granted permission to copy, modify and redistribute
  12. Ghostscript, but only under the conditions described in the Ghostscript
  13. General Public License.  A copy of this license is supposed to have been
  14. given to you along with Ghostscript so you can know your rights and
  15. responsibilities.  It should be in a file named COPYING.  Among other
  16. things, the copyright notice and this notice must be preserved on all
  17. copies.  */
  18.  
  19. /* gdevpcfb.c */
  20. /* IBM PC EGA and VGA display drivers for Ghostscript */
  21. /* This is fundamentally an EGA driver with some parameters */
  22. /* that allow it to drive larger displays. */
  23. #include "memory_.h"
  24. #include "gx.h"
  25. #include "gserrors.h"
  26. #include "gxdevice.h"
  27. #include "gdevpcfb.h"
  28.  
  29. /* ------ Internal routines ------ */
  30.  
  31. /* We can't catch signals.... */
  32. void
  33. ega_set_signals(gx_device *dev)
  34. {
  35. }
  36.  
  37. /* Read the device mode */
  38. int
  39. ega_get_mode(void)
  40. {    registers regs;
  41.     regs.h.ah = 0xf;
  42.     int86(0x10, ®s, ®s);
  43.     return regs.h.al;
  44. }
  45.  
  46. /* Set the device mode */
  47. void
  48. ega_set_mode(int mode)
  49. {    registers regs;
  50.     regs.h.ah = 0;
  51.     regs.h.al = mode;
  52.     int86(0x10, ®s, ®s);
  53. }
  54.